﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;

namespace Snowdreamist.Prism.Region
{
	[MetadataAttribute]
	[AttributeUsage(AttributeTargets.Class)]
	public class ViewPartExportAttribute : ExportAttribute
	{
		public ViewPartExportAttribute(string targetViewName, string targetRegionName) : this(null, typeof(IViewPart), targetViewName, targetRegionName, 0) { }
		public ViewPartExportAttribute(string contractName, string targetViewName, string targetRegionName) : this(contractName, typeof(IViewPart), targetViewName, targetRegionName, 0) { }
		public ViewPartExportAttribute(string targetViewName, string targetRegionName,int order) : this(null, typeof(IViewPart), targetViewName, targetRegionName, order) { }
		public ViewPartExportAttribute(string contractName, string targetViewName, string targetRegionName,int order) : this(contractName, typeof(IViewPart), targetViewName, targetRegionName, order) { }
		public ViewPartExportAttribute(Type contractType, string targetViewName, string targetRegionName) : this(null, contractType, targetViewName, targetRegionName, 0) { }
		public ViewPartExportAttribute(string contractName, Type contractType, string targetViewName, string targetRegionName) : this(contractName, contractType, targetViewName, targetRegionName, 0) { }
		public ViewPartExportAttribute(Type contractType, string targetViewName, string targetRegionName, int order) : this(null, contractType, targetViewName, targetRegionName, order) { }
		public ViewPartExportAttribute(string contractName, Type contractType, string targetViewName, string targetRegionName, int order)
			: base(contractName, contractType)
		{
			TargetViewName = targetViewName;
			TargetRegionName = targetRegionName;
			Order = order;
		}
		public string TargetViewName { get; set; }
		public string TargetRegionName { get; set; }
		public int Order { get; set; }
	}
}
